/*
** lib2.c for  in /home/gomes_m//my-project-a-moi/server
** 
** Made by mickael gomes
** Login   <gomes_m@epitech.net>
** 
** Started on  Fri Jul 26 13:34:52 2013 mickael gomes
** Last update Fri Jul 26 14:20:01 2013 mickael gomes
*/

#include		<stdlib.h>
#include		"struct.h"
#include		"prototypes.h"

int			tab_len(char **tab)
{
  int			i = 0;

  if (tab == NULL)
    return (0);
  while (tab[i])
    i++;
  return (i);
}

char			*my_strcat_plus(char *s1, char *s2, char sep)
{
  int			i;
  char			*res_str;

  i = 0;
  res_str = xmalloc(sizeof(char) * (my_strlen(s1) + my_strlen(s2) + 2));
  while (*s1)
    res_str[i++] = *(s1++);
  res_str[i++] = sep;
  while (*s2)
    res_str[i++] = *(s2++);
  res_str[i] = '\0';
  return (res_str);
}
